diff --git a/django/contrib/admin/checks.py b/django/contrib/admin/checks.py
index 76c3bd5657..bca80c897e 100644
--- a/django/contrib/admin/checks.py
+++ b/django/contrib/admin/checks.py
@@ -65,7 +65,6 @@ def check_dependencies(**kwargs):
         ('django.contrib.contenttypes', 401),
         ('django.contrib.auth', 405),
         ('django.contrib.messages', 406),
-        ('django.contrib.sessions', 407),
     )
     for app_name, error_code in app_dependencies:
         if not apps.is_installed(app_name):
@@ -74,6 +73,14 @@ def check_dependencies(**kwargs):
                 "application." % app_name,
                 id='admin.E%d' % error_code,
             ))
+
+    if not _contains_subclass('django.contrib.sessions.middleware.SessionMiddleware', settings.MIDDLEWARE):
+        errors.append(checks.Error(
+            "'django.contrib.sessions.middleware.SessionMiddleware' or a subclass "
+            "must be in MIDDLEWARE in order to use the admin application.",
+            id='admin.E407',
+        ))
+
     for engine in engines.all():
         if isinstance(engine, DjangoTemplates):
             django_templates_instance = engine.engine
